1. Field of the Invention
The present invention relates to an electronic control device having an abnormality detection function (failure diagnosis function) for an analog-to-digital converter for converting an analog signal into a digital signal.
2. Description of the Related Art
FIG. 2 is a block diagram illustrating a conventional electronic control device. Note that, the electronic control device of FIG. 2 corresponds to a conventional device as disclosed in, for example, Japanese Patent Application Laid-open No. 2009-135655. In FIG. 2, a plurality of control signals 150a are input to a main microcomputer 110 from an external sensor and the like. The control signal 150a is converted into digital data by a main microcomputer analog-to-digital converter 111 built into the main microcomputer 110, and is used to control an operation of a control subject.
Here, if analog-to-digital conversion cannot be normally performed on the plurality of control signals 150a due to a failure of the main microcomputer analog-to-digital converter 111, this may exert a significant influence upon a result of the control using an analog-to-digital conversion result of the control signal 150a. 
Therefore, the conventional device detects a failure of the main microcomputer analog-to-digital converter 111 by the following procedure. First, a signal output section 115 built into the main microcomputer 110 operates a predetermined voltage switching circuit 130. In response to this operation, the predetermined voltage switching circuit 130 generates a failure diagnosis signal 130a from a reference voltage for analog-to-digital conversion (hereinafter, referred to as “Vref”). The failure diagnosis signal 130a is input to the main microcomputer 110.
Further, the failure diagnosis signal 130a is converted into main microcomputer analog-to-digital conversion data 111a by the main microcomputer analog-to-digital converter 111. Then, the main microcomputer analog-to-digital conversion data 111a is input to difference calculating means 122 within a sub microcomputer 120 through a communication line 131. In addition, the failure diagnosis signal 130a is also input to the sub microcomputer 120, and is converted into sub microcomputer analog-to-digital conversion data 121a by a sub microcomputer analog-to-digital converter 121. The sub microcomputer analog-to-digital conversion data 121a is input to the difference calculating means 122.
The difference calculating means 122 calculates a difference value between the main microcomputer analog-to-digital conversion data 111a and the sub microcomputer analog-to-digital conversion data 121a, and generates difference value data 122a on the difference value. The difference value data 122a is input to failure diagnosis means (abnormality determination means) 114 within the main microcomputer 110 through a communication line 132. The failure diagnosis means 114 monitors fluctuations in the difference value between the main microcomputer analog-to-digital conversion data 111a and the sub microcomputer analog-to-digital conversion data 121a based on the difference value data 122a. Further, the failure diagnosis means 114 determines that at least one of the main microcomputer analog-to-digital converter 111 and the sub microcomputer analog-to-digital converter 121 is in failure when confirming that the difference value has exceeded a preset upper limit difference value 110a. 
Here, the failure diagnosis signal 130a is a binary rectangular wave signal (pulse signal) that is switched periodically. Therefore, the main microcomputer analog-to-digital conversion data 111a and the sub microcomputer analog-to-digital conversion data 121a include results of the analog-to-digital conversion for the respective binary voltages of the failure diagnosis signal 130a. The difference value data 122a also includes the difference value corresponding to the binary voltages of the failure diagnosis signal 130a. 
In the conventional device as described above, the predetermined voltage switching circuit 130 generates the failure diagnosis signal 130a from Vref. However, Vref represents a reference voltage for the main microcomputer analog-to-digital converter 111. Therefore, when fluctuations occur in Vref, the main microcomputer analog-to-digital conversion data 111a of the main microcomputer analog-to-digital converter 111 and the sub microcomputer analog-to-digital conversion data 121a of the sub microcomputer analog-to-digital converter 121 mutually exhibit similar fluctuations. As a result, an abnormality in Vref cannot sometimes be detected even if the conversion data is compared between the main microcomputer analog-to-digital converter 111 and the sub microcomputer analog-to-digital converter 121. The conventional device may thus fail to appropriately perform abnormality detection for the analog-to-digital converter due to the abnormality in Vref.